<!DOCTYPE html>
<title>Test that u, b, i WebVTT objects are being styled correctly.</title>
<script src="../media-controls.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
    var video = document.querySelector('video');
    video.src = '../content/test.ogv';

    var track = document.createElement('track');
    track.src = 'captions-webvtt/styling-default.vtt';
    track.kind = 'captions';
    track.default = true;
    video.appendChild(track);

    video.onseeked = t.step_func_done(function() {
        var cueNode = textTrackCueElementByIndex(video, 0).firstChild.firstElementChild;
        assert_equals(getComputedStyle(cueNode).fontWeight, '700');
        cueNode = cueNode.nextElementSibling;
        assert_equals(getComputedStyle(cueNode).fontStyle, 'italic');
        cueNode = cueNode.nextElementSibling;
        assert_equals(getComputedStyle(cueNode).textDecoration, 'underline solid rgb(255, 255, 255)');
    });

    video.currentTime = 0.1;
});
</script>
